<?
include("../lib/var.php");
include("../header.php");
include("../lib/config.php");
?>
<script type="text/javascript" language="javascript">

	function Validate(){
		if(document.FEmployee.username.value == "")
		{
			alert("Field : Username tidak boleh kosong ...");
			document.FEmployee.username.focus();
			return false;
		}
		
		if(document.FEmployee.pass_lama.value == "")
		{
			alert("Field : Password Lama tidak boleh kosong ...");
			document.FEmployee.pass_lama.focus();
			return false;
		}
		
		if(document.FEmployee.pass_baru.value == "")
		{
			alert("Field : Password Baru tidak boleh kosong ...");
			document.FEmployee.pass_baru.focus();
			return false;
		}
		
		if(document.FEmployee.conf_pass_baru.value == "")
		{
			alert("Field : Konfirmasi Password Baru tidak boleh kosong ...");
			document.FEmployee.conf_pass_baru.focus();
			return false;
		}
		
		if(document.FEmployee.conf_pass_baru.value != document.FEmployee.pass_baru.value )
		{
			alert("Field : Maaf, Password Baru dan Konfirmasi Password Baru tidak sama ...");
			document.FEmployee.conf_pass_baru.focus();
			return false;
		}
		
		document.FEmployee.submit();

	}
	
</script>
</head>
<form name="FEmployee" method="post" action="../lib/update.php">
<table width="93%" class="table_indent2" class="no_border">
 <tr>
  <td colspan="2">
	<table width="100%" style="border:none;">
	<tr>
	 <td colspan="2" class="line_bottom"><b>UBAH PASSWORD</b></td>
	</tr>
	</table>
  </td>
  </td>
 </tr>
 <tr>
  <td>&nbsp;</td>
 </tr>
 <tr>
  <td>
 <table cellpadding="1" cellspacing="0">
 <tr>
  <td width="200">Username Anda</td>
  <td>: <input type="text" name="username" value="<?=$HTTP_SESSION_VARS['user_login']?>" readonly="" />
	<span class="required">*</span></td>
 </tr>
 <tr>
  <td>Password Lama</td>
  <td>: <input type="password" name="pass_lama" size="35" value="<?=$row[Code]?>" <? if($op == "edit"){ echo"readonly"; } else {} ?> /> <span class="required">*</span></td>
 </tr>
 <tr>
  <td>Password Baru</td>
  <td>: <input type="password" name="pass_baru" size="35" value="<?=$row[Remarks]?>" /> <span class="required">*</span></td>
 </tr>
 <tr>
  <td>Konfirmasi Password Baru</td>
  <td>: <input type="password" name="conf_pass_baru" size="35" value="<?=$row[IDCode]?>" /> <span class="required">*</span></td>
 </tr>
 <tr>
  <td>&nbsp;</td>
  <td align="left"><br />
  <input type="hidden" name="cat" value="ch_pass" />
  <input type="button" value="Batal" class="button" onclick="Javascript:history.back();" /><input type="button" value="Update" class="button" onclick="Validate();"/>
  <br /><br />
  </td>
 </tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>
<script type="text/javascript">

//var f = document.forms[0];
//MaskInput(f.code,"9999");
//]]>
</script>
<?
echo"</div>
	  </td>
	   </tr>
	    </table>
";
include("../menu.php");
?>